<template>
  <!-- <el-dialog
    ref="dialog"
    :title="props.adminId?'编辑管理员':'添加管理员'"
    width="30%"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    @close="emit('update:admin-id',null)"
  >
    <span>This is a message</span>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="handleCancel">Cancel</el-button>
        <el-button
          type="primary"
        >Confirm</el-button>
      </span>
    </template>
  </el-dialog> -->
  <app-dialog-form
    :title="props.adminId?'编辑管理员':'添加管理员'"
    @close="emit('update:admin-id',null)"
  >
    <span>内容</span>
  </app-dialog-form>
</template>

<script lang="ts" setup>
// import { ref } from 'vue'
// import type { IElDialog } from '@/types/element-plus'
import type { PropType } from 'vue'

const props = defineProps({
  adminId: { // 编辑管理员id
    type: Number as PropType<number|null>,
    default: null
  }
})
// const dialog = ref<IElDialog | null>(null)
// const handleCancel = () => {
//   if (dialog.value) {
//     dialog.value.visible = false
//   }
// }

interface EmitsType {
  (e:'update:admin-id', value:null|number):void
}
const emit = defineEmits<EmitsType>()
</script>

<style lang="scss" scoped>
</style>
